3.27 \(\int \frac{(a+b \log (c x^n)) \log (d (\frac{1}{d}+f x^2))}{x^3} \, dx\)

Optimal. Leaf size=141 \[ -\frac{1}{4} b d f n \text{PolyLog}\left (2,-d f x^2\right )+d f \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac{1}{2} d f \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{\log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac{1}{4} b d f n \log \left (d f x^2+1\right )-\frac{b n \log \left (d f x^2+1\right )}{4 x^2}-\frac{1}{2} b d f n \log ^2(x)+\frac{1}{2} b d f n \log (x) \]

[Out]

(b*d*f*n*Log[x])/2 - (b*d*f*n*Log[x]^2)/2 + d*f*Log[x]*(a + b*Log[c*x^n]) - (b*d*f*n*Log[1 + d*f*x^2])/4 - (b*
n*Log[1 + d*f*x^2])/(4*x^2) - (d*f*(a + b*Log[c*x^n])*Log[1 + d*f*x^2])/2 - ((a + b*Log[c*x^n])*Log[1 + d*f*x^
2])/(2*x^2) - (b*d*f*n*PolyLog[2, -(d*f*x^2)])/4

________________________________________________________________________________________

Rubi [A]  time = 0.127723, antiderivative size = 141, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 8, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.308, Rules used = {2454, 2395, 36, 29, 31, 2376, 2301, 2391} \[ -\frac{1}{4} b d f n \text{PolyLog}\left (2,-d f x^2\right )+d f \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac{1}{2} d f \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{\log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac{1}{4} b d f n \log \left (d f x^2+1\right )-\frac{b n \log \left (d f x^2+1\right )}{4 x^2}-\frac{1}{2} b d f n \log ^2(x)+\frac{1}{2} b d f n \log (x) \]

Antiderivative was successfully verified.

[In]

Int[((a + b*Log[c*x^n])*Log[d*(d^(-1) + f*x^2)])/x^3,x]

[Out]

(b*d*f*n*Log[x])/2 - (b*d*f*n*Log[x]^2)/2 + d*f*Log[x]*(a + b*Log[c*x^n]) - (b*d*f*n*Log[1 + d*f*x^2])/4 - (b*
n*Log[1 + d*f*x^2])/(4*x^2) - (d*f*(a + b*Log[c*x^n])*Log[1 + d*f*x^2])/2 - ((a + b*Log[c*x^n])*Log[1 + d*f*x^
2])/(2*x^2) - (b*d*f*n*PolyLog[2, -(d*f*x^2)])/4

Rule 2454

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[I
nt[x^(Simplify[(m + 1)/n] - 1)*(a + b*Log[c*(d + e*x)^p])^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, e, m, n, p,
 q}, x] && IntegerQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0]) &&  !(EqQ[q, 1] && ILtQ[n, 0] &&
 IGtQ[m, 0])

Rule 2395

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((f + g
*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n]))/(g*(q + 1)), x] - Dist[(b*e*n)/(g*(q + 1)), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 2376

Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((g_.)*(x_))^(q_.), x_Sym
bol] :> With[{u = IntHide[(g*x)^q*Log[d*(e + f*x^m)^r], x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[Dist
[1/x, u, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, r, m, n, q}, x] && (IntegerQ[(q + 1)/m] || (RationalQ[m] &
& RationalQ[q])) && NeQ[q, -1]

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int \frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (\frac{1}{d}+f x^2\right )\right )}{x^3} \, dx &=d f \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac{1}{2} d f \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}-(b n) \int \left (\frac{d f \log (x)}{x}-\frac{\log \left (1+d f x^2\right )}{2 x^3}-\frac{d f \log \left (1+d f x^2\right )}{2 x}\right ) \, dx\\ &=d f \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac{1}{2} d f \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}+\frac{1}{2} (b n) \int \frac{\log \left (1+d f x^2\right )}{x^3} \, dx+\frac{1}{2} (b d f n) \int \frac{\log \left (1+d f x^2\right )}{x} \, dx-(b d f n) \int \frac{\log (x)}{x} \, dx\\ &=-\frac{1}{2} b d f n \log ^2(x)+d f \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac{1}{2} d f \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}-\frac{1}{4} b d f n \text{Li}_2\left (-d f x^2\right )+\frac{1}{4} (b n) \operatorname{Subst}\left (\int \frac{\log (1+d f x)}{x^2} \, dx,x,x^2\right )\\ &=-\frac{1}{2} b d f n \log ^2(x)+d f \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac{b n \log \left (1+d f x^2\right )}{4 x^2}-\frac{1}{2} d f \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}-\frac{1}{4} b d f n \text{Li}_2\left (-d f x^2\right )+\frac{1}{4} (b d f n) \operatorname{Subst}\left (\int \frac{1}{x (1+d f x)} \, dx,x,x^2\right )\\ &=-\frac{1}{2} b d f n \log ^2(x)+d f \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac{b n \log \left (1+d f x^2\right )}{4 x^2}-\frac{1}{2} d f \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}-\frac{1}{4} b d f n \text{Li}_2\left (-d f x^2\right )+\frac{1}{4} (b d f n) \operatorname{Subst}\left (\int \frac{1}{x} \, dx,x,x^2\right )-\frac{1}{4} \left (b d^2 f^2 n\right ) \operatorname{Subst}\left (\int \frac{1}{1+d f x} \, dx,x,x^2\right )\\ &=\frac{1}{2} b d f n \log (x)-\frac{1}{2} b d f n \log ^2(x)+d f \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac{1}{4} b d f n \log \left (1+d f x^2\right )-\frac{b n \log \left (1+d f x^2\right )}{4 x^2}-\frac{1}{2} d f \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}-\frac{1}{4} b d f n \text{Li}_2\left (-d f x^2\right )\\ \end{align*}

Mathematica [C]  time = 0.0956682, size = 241, normalized size = 1.71 \[ b d f n \left (\frac{1}{2} \left (-\text{PolyLog}\left (2,-i \sqrt{d} \sqrt{f} x\right )-\log (x) \log \left (1+i \sqrt{d} \sqrt{f} x\right )\right )+\frac{1}{2} \left (-\text{PolyLog}\left (2,i \sqrt{d} \sqrt{f} x\right )-\log (x) \log \left (1-i \sqrt{d} \sqrt{f} x\right )\right )+\frac{\log ^2(x)}{2}\right )-\frac{1}{2} a d f \log \left (d f x^2+1\right )-\frac{a \log \left (d f x^2+1\right )}{2 x^2}+a d f \log (x)+\frac{1}{2} b d f \log (x) \left (2 \left (\log \left (c x^n\right )-n \log (x)\right )+n\right )-\frac{1}{4} b d f \left (2 \left (\log \left (c x^n\right )-n \log (x)\right )+n\right ) \log \left (d f x^2+1\right )-\frac{b \left (2 \left (\log \left (c x^n\right )-n \log (x)\right )+2 n \log (x)+n\right ) \log \left (d f x^2+1\right )}{4 x^2} \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*Log[c*x^n])*Log[d*(d^(-1) + f*x^2)])/x^3,x]

[Out]

a*d*f*Log[x] + (b*d*f*Log[x]*(n + 2*(-(n*Log[x]) + Log[c*x^n])))/2 - (a*d*f*Log[1 + d*f*x^2])/2 - (a*Log[1 + d
*f*x^2])/(2*x^2) - (b*d*f*(n + 2*(-(n*Log[x]) + Log[c*x^n]))*Log[1 + d*f*x^2])/4 - (b*(n + 2*n*Log[x] + 2*(-(n
*Log[x]) + Log[c*x^n]))*Log[1 + d*f*x^2])/(4*x^2) + b*d*f*n*(Log[x]^2/2 + (-(Log[x]*Log[1 + I*Sqrt[d]*Sqrt[f]*
x]) - PolyLog[2, (-I)*Sqrt[d]*Sqrt[f]*x])/2 + (-(Log[x]*Log[1 - I*Sqrt[d]*Sqrt[f]*x]) - PolyLog[2, I*Sqrt[d]*S
qrt[f]*x])/2)

________________________________________________________________________________________

Maple [C]  time = 0.09, size = 619, normalized size = 4.4 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))*ln(d*(1/d+f*x^2))/x^3,x)

[Out]

(-1/2*b/x^2*ln(d*(1/d+f*x^2))+b*f*d*ln(x)-1/2*b*f*d*ln(d*(1/d+f*x^2)))*ln(x^n)-1/4*I*Pi*b*csgn(I*x^n)*csgn(I*c
*x^n)^2/x^2*ln(d*f*x^2+1)-1/2*I*f*d*ln(x)*Pi*b*csgn(I*c*x^n)^3-1/4*I*f*d*ln(d*f*x^2+1)*Pi*b*csgn(I*c)*csgn(I*c
*x^n)^2-1/4*I*f*d*ln(d*f*x^2+1)*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^2+1/2*I*f*d*ln(x)*Pi*b*csgn(I*x^n)*csgn(I*c*x^n
)^2+1/2*I*f*d*ln(x)*Pi*b*csgn(I*c)*csgn(I*c*x^n)^2-1/4*b*n*ln(d*f*x^2+1)/x^2+1/2*b*d*f*n*ln(x)-1/2*b*d*f*n*ln(
x)^2-1/4*b*d*f*n*ln(d*f*x^2+1)+1/4*I*Pi*b*csgn(I*c*x^n)^3/x^2*ln(d*f*x^2+1)+f*d*ln(x)*ln(c)*b-1/2*f*d*ln(d*f*x
^2+1)*ln(c)*b-1/2*f*d*b*n*dilog(1-x*(-d*f)^(1/2))-1/2*f*d*b*n*dilog(1+x*(-d*f)^(1/2))-1/4*I*Pi*b*csgn(I*c)*csg
n(I*c*x^n)^2/x^2*ln(d*f*x^2+1)-1/2*I*f*d*ln(x)*Pi*b*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)-1/2*a/x^2*ln(d*f*x^2+1
)+1/4*I*Pi*b*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)/x^2*ln(d*f*x^2+1)-1/2*f*d*b*n*ln(x)*ln(1+x*(-d*f)^(1/2))-1/2*
f*d*b*n*ln(x)*ln(1-x*(-d*f)^(1/2))+1/4*I*f*d*ln(d*f*x^2+1)*Pi*b*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+1/4*I*f*d*
ln(d*f*x^2+1)*Pi*b*csgn(I*c*x^n)^3+a*d*f*ln(x)-1/2*a*d*f*ln(d*f*x^2+1)-1/2*b*ln(c)/x^2*ln(d*f*x^2+1)+1/2*n*b*l
n(x)*ln(d*f*x^2+1)*d*f

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} -\frac{{\left (b{\left (n + 2 \, \log \left (c\right )\right )} + 2 \, b \log \left (x^{n}\right ) + 2 \, a\right )} \log \left (d f x^{2} + 1\right )}{4 \, x^{2}} + \int \frac{2 \, b d f \log \left (x^{n}\right ) + 2 \, a d f +{\left (d f n + 2 \, d f \log \left (c\right )\right )} b}{2 \,{\left (d f x^{3} + x\right )}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(d*(1/d+f*x^2))/x^3,x, algorithm="maxima")

[Out]

-1/4*(b*(n + 2*log(c)) + 2*b*log(x^n) + 2*a)*log(d*f*x^2 + 1)/x^2 + integrate(1/2*(2*b*d*f*log(x^n) + 2*a*d*f
+ (d*f*n + 2*d*f*log(c))*b)/(d*f*x^3 + x), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{b \log \left (d f x^{2} + 1\right ) \log \left (c x^{n}\right ) + a \log \left (d f x^{2} + 1\right )}{x^{3}}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(d*(1/d+f*x^2))/x^3,x, algorithm="fricas")

[Out]

integral((b*log(d*f*x^2 + 1)*log(c*x^n) + a*log(d*f*x^2 + 1))/x^3, x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))*ln(d*(1/d+f*x**2))/x**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b \log \left (c x^{n}\right ) + a\right )} \log \left ({\left (f x^{2} + \frac{1}{d}\right )} d\right )}{x^{3}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(d*(1/d+f*x^2))/x^3,x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)*log((f*x^2 + 1/d)*d)/x^3, x)